<?php

/*
 * action : Register
 * param: user、password、sex
 * return: uid、sex、money、rmb、coin、login_days、is_get、history[2] (total_win、total_lose)、total_borad、total_win、exp
 */

include_once("httpclient.php");
include_once('config.php');
$url_prefix = Config::$url_prefix;

$action = "AutoRegister";


$array_char = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
shuffle($array_char);
srand(time(NULL));
for ($i=0; $i<20; $i++){

$chars = ' ';
for ($j=0; $j<4; $j++){
	$chars = $chars . $array_char[rand() % 26]; 
}
$param = array();
$param['user'] = $chars . rand(1, 100000);
$param['password'] = rand(1,1000000);
$param['sex'] = rand(1, 2);
$param['vercode'] = "1";
$param['ua'] = $param['user'];
$param['imsi'] = "460000000000000";
$param['imei'] = "350000000000000";
$param['cid'] = "1000";

$query = array();

$query['action'] = $action;
$query['ver'] = Config::$ver;
$query['param'] = json_encode($param);

$url = $url_prefix . http_build_query($query);

$client = new HttpClient();
echo "<pre />";
echo $client->get($url);
}
?>
